using System;
using System.Collections.Generic;
using System.Text;
using System.ComponentModel;
using System.Xml.Serialization;

namespace AjGenesisStudio.Tools
{
    [Serializable]
    class ExternalTool : INotifyPropertyChanged
    {
        public ExternalTool() { }

        private string title;
        [XmlAttribute]
        public string Title
        {
            get { return title; }
            set { 
                title = value;
                OnPropertyChanged("Title");
            }
        }

        private string command;
        [XmlAttribute]
        public string Command
        {
            get { return command; }
            set { command = value; }
        }

        private string arguments;
        [XmlAttribute]
        public string Arguments
        {
            get { return arguments; }
            set { arguments = value; }
        }

        private string directory;
        [XmlAttribute]
        public string WorkingDirectory
        {
            get { return directory; }
            set { directory = value; }
        }

        private bool useoutputwindow;
        [XmlAttribute]
        public bool UseOuputWindow
        {
            get { return useoutputwindow; }
            set { useoutputwindow = value; }
        }

        public override string ToString()
        {
            return title;
        }

        protected void OnPropertyChanged(string property)
        {
            if (PropertyChanged != null)
                PropertyChanged(this, new PropertyChangedEventArgs(property));
        }

        #region Miembros de INotifyPropertyChanged

        public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;

        #endregion
    }
}
